<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">优惠券名称:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">选择医院:</label>
        <div class="col-xs-12 col-sm-8">
           <select  id="c-hospitalid" data-live-search=”true” multiple data-rule="required" class="form-control selectpicker" name="row[hospitalid][]">
                {foreach name="hospitalidList" item="vo"}
                <option value="{$vo.id}" {in name="key" value="0"}selected{/in}>{$vo.name}</option>
                {/foreach}
            </select>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">背景图:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-avatar" data-rule="required" class="form-control" size="50" name="row[avatar]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-avatar" class="btn btn-danger faupload" data-input-id="c-avatar" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-avatar"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-avatar" class="btn btn-primary fachoose" data-input-id="c-avatar" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-avatar"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-avatar"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">类型:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="radio">
                <label>
                    <input name="row[type]" type="radio" value="1" checked  onclick="$('.manjian').removeClass('hide');$('.zhekou').addClass('hide')"> 满减券
                </label>
            </div>

            <div class="radio">
                <label>
                    <input name="row[type]" type="radio" value="2" onclick="$('.zhekou').removeClass('hide');$('.manjian').addClass('hide')"> 折扣券
                </label>
            </div>
        </div>
    </div>
    <div class="form-group manjian">
        <label class="control-label col-xs-12 col-sm-2">使用条件:</label>
        <div class="col-xs-12 col-sm-8">
			<div class="input-group">
				<div class="input-group-addon">使用限额（元）</div>
				<input id="c-price" data-rule="required;" class="form-control" step="0.01" value="0" name="row[limit]" type="number">
				<div class="input-group-addon">面额（元）</div>
				<input id="c-yajin" data-rule="required;" class="form-control" step="0.01" value="0" name="row[amount]" type="number">
			</div>
        </div>
    </div>
    <div class="form-group zhekou hide">
        <label class="control-label col-xs-12 col-sm-2">折扣比例:</label>
        <div class="col-xs-12 col-sm-8">
			<div class="input-group">
				<input data-rule="required;" class="form-control" step="0.01" value="1" name="row[zhekou]" type="number">
			</div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">权重:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control"  name="row[weigh]" type="text" value="1">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
